

	class GraphicsData implements IPoolObject{
		private __m:Laya.Matrix;
		private __tex:Laya.Texture;
		private __inPool:boolean;
		private __uv:Array<any>;
		public constructor() {
			var s = this;			
			s.__m = new Laya.Matrix;
			s.__tex = new Laya.Texture;
			s.__tex["$hashCode"] = Date.now();
			s.__uv = [0,0,1,0,1,1,0,1];
		}
		public setData(tex:Laya.Texture,toX:number,toY:number,w:number,h:number,m:Laya.Matrix=null):void
		{
			var s = this;	
			if(m != null)
			{
				s.__uv.length = 0;		
				s.__uv[0] = (-m.tx+toX)/tex.width;
				s.__uv[1] = (-m.ty+toY)/tex.height;
				s.__uv[2] = (-m.tx+toX + w)/tex.width;
				s.__uv[3] = s.__uv[1];
				s.__uv[4] = s.__uv[2];
				s.__uv[5] = (-m.ty+toY + h)/tex.height;
				s.__uv[6] = s.__uv[0];
				s.__uv[7] = s.__uv[5];							
			}
			// (<any>s.__tex).bitmap=(<any>tex).bitmap;
			s.__tex.setTo(tex.bitmap,s.__uv);
		}
		public clear():void{
			var s = this;
			PoolUtil.toPool(s,GraphicsData);
			s.__m.setTo(1,0,0,1,0,0);
			s.__uv[0]=0;
			s.__uv[1]=0;
			s.__uv[2]=1;
			s.__uv[3]=0;
			s.__uv[4]=1;
			s.__uv[5]=1;
			s.__uv[6]=0;
			s.__uv[7]=1;
		}
		public get matrix():Laya.Matrix
		{
			return this.__m;
		}
		public get texture():Laya.Texture
		{
			return this.__tex;
		}		
		public get inPool():boolean
		{
			return this.__inPool;
		}
		public set inPool(val:boolean)
		{
			this.__inPool = val;
		}
		
		public outPoolInit():void
		{

		}
		public dispose(): void {
			
		}
	}
